import time
from datetime import datetime


def diff_time_seconds(his_update_time, current_time):
    diff_time_data_1 = datetime.strptime(his_update_time[:19], "%Y-%m-%d %H:%M:%S")
    diff_time_data_2 = datetime.strptime(current_time[:19], "%Y-%m-%d %H:%M:%S")
    time_diff = diff_time_data_2 - diff_time_data_1
    return time_diff.seconds


if __name__ == '__main__':
    timer_temp_demo = str(datetime.now())[:19]
    print(timer_temp_demo)
    timer_temp_temp = str(datetime.now())[:19]
    data = diff_time_seconds(timer_temp_temp, "2025-02-28 20:49:49.123")
    print(data)



